package com.java1412.mq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author java1412
 * @create 2021-07-07 14:44
 */
@Slf4j
@Component
public class RabbitConsumer {
    @RabbitListener(queues = "firstRabbit")
    @RabbitHandler
    public void receiveMsg(String msg) {
        System.out.println("接收消息---->content:" + msg);
    }
}
